import request from '@/utils/request'

// 查询生产异常记录列表
export function listException(query) {
  return request({
    url: '/production-service/production/exception/list',
    method: 'get',
    params: query
  })
}

// 查询生产异常记录详细
export function getException(anomalyId) {
  return request({
    url: '/production-service/production/exception/' + anomalyId,
    method: 'get'
  })
}

// 新增生产异常记录
export function addException(data) {
  return request({
    url: '/production-service/production/exception',
    method: 'post',
    data: data
  })
}

// 修改生产异常记录
export function updateException(data) {
  return request({
    url: '/production-service/production/exception',
    method: 'put',
    data: data
  })
}

// 删除生产异常记录
export function delException(anomalyId) {
  return request({
    url: '/production-service/production/exception/' + anomalyId,
    method: 'delete'
  })
}
